﻿/*  ToolsMK - QuickText
 *  
 *  Copyright (C) 2009  Maik Kellerhals
 *  
 *  This file is part of ToolsMK.
 *  
 *  ToolsMK is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  Foobar is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 *
 * 
 * DESCRIPTION
 * ===========
 * 
 * Class for creating a quick textfield without having to worry about
 * creating a TextFormat-Instance.
 * Perfect as a debug-helper
 * 
 * extends Textfield, so all texfield properties and functions apply
 * 
 * 
 * PLANNED FEATURES
 * ================
 * 
 * - If possible, add font embedding
 * 
 * 
 * EXAMPLE
 * =======
 * 
 * var newText:QuickText = new QuickText();
 * 
 * newText.text = "example";
 * 
 * addChild(newText);
 */
package mk.objectsMK {
	import flash.text.TextField;
	import flash.text.TextFormat;

	public class QuickText extends TextField {
		private var format:TextFormat = new TextFormat();

		public function QuickText(color:Number=0xFFFFFF, size:int=12, font:String="Arial") {
			format.font = font;
			format.color = color;
			format.size = size;
			this.defaultTextFormat = format;
		}
	}
}